<%--
  Created by IntelliJ IDEA.
  User: 许正雄
  Date: 2021/12/7
  Time: 11:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>后台管理</title>
    <link type="text/css" rel="stylesheet" href="/static/css/style.css" />
    <script type="text/javascript" src="/static/scripts/function-manage.js"></script>
    <SCRIPT type="text/javascript" src="/static/jquery3.6.0.js"></SCRIPT>
</head>
<body>
<%@include file="head.jsp"%>
<div id="position" class="wrap">
    您现在的位置： 管理后台
</div>
<div id="main" class="wrap">
    <%@include file="left.jsp"%>
<div class="main">
    <h2>修改管理员</h2>
    <div class="manage">
        <form method="post" id="frm">
            <input type="hidden" name="id" value="${users.id}"/>
            <table class="form">
                <tr>
                    <td class="field">用户名：</td>
                    <td><input type="text" class="text" name="userName" value="${users.userName}" /></td>
                </tr>
                <tr>
                    <td class="field">密码：</td>
                    <td><input type="text" class="text" name="password" value="${users.password}" /></td>
                </tr>
                <tr>
                    <td class="field">姓名：</td>
                    <td><input type="text" class="text" name="name" value="${users.fullName}" /></td>
                </tr>
                <tr>
                    <td class="field">备注：</td>
                    <td><input type="text" class="text" name="remark" value="${users.remark}" /></td>
                </tr>
                <tr>
                    <td></td>
                    <td><label class="ui-blue"><button type="button" id="but">修改</button></label></td>
                </tr>
            </table>
        </form>
    </div>
</div>
<div class="clear"></div>
</div>
<div id="footer">
</div>
</body>
<script>
    $(function () {
        $("#but").click(function () {
            $.ajax({
                url:"../manage/updateUser",
                type:"post",
                data:$("#frm").serialize(),
                success:function (ret) {
                    if (ret*1===1){
                        alert("修改成功！！！");
                        window.location.href="selectAdminPage";
                    }
                }
            })
        })
    })
</script>
</html>

